package com.atguigu.day05;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author Felix
 * @date 2024/7/13
 * 该案例对窗口的API进行概述
 */
public class Flink04_Window_KeyBy_NoKeyBy {
    public static void main(String[] args) {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStreamSource<Integer> ds = env.fromElements(1, 2, 3, 4);
        //no keyBy
        //ds.windowAll();
        //ds.countWindowAll()
        //ds.keyBy(0).window();
        //ds.keyBy(0).countWindow()
        //ds
        //        .windowAll()
        //        .trigger()
        //        .evictor()
        //        .process()

    }
}
